<%@ page contentType="text/html; charset=UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>CartShelf管理</title>
<%@include file="/WEB-INF/views/common/head.jsp"%>

<link rel="stylesheet" href="/assets/plugin/validator/css/bootstrapValidator.css" />
<script type="text/javascript" src="/assets/plugin/validator/js/bootstrapValidator.js"></script>
<script type="text/javascript" src="/assets/plugin/validator/js/language/zh_CN.js"></script>
<script src="/js/model/cartShelf.js"></script>
<script type="text/javascript" src="/js/My97DatePicker/WdatePicker.js"></script>
<script src="/js/preView.js"></script>
<script type="text/javascript">
	function getSubTypeCode(){
		var typeCode=$("#typeCode").val();
		$.ajax({
            type:"POST",
            url:"cartShelf_prepareInput.action?typeCode="+typeCode,
            contentType:"application/json; charset=utf-8",
            success:function(msg){  //成功
                alert(msg);
            }         
        }); 
	}
</script>

</head>
<body>
	<div class="main-content">
		<div class="breadcrumbs" id="breadcrumbs">
			<ul class="breadcrumb">
				<li><i class="icon-home home-icon"></i> <a href="/" target="_top">主页</a></li>
				<li><i class="icon-list"></i><a href="#">组织机构</a></li>
				<li class="active">CartShelf管理</li>
			</ul>
		</div>
		<div class="page-content">
			<div class="page-header">
				<h1>
					CartShelf管理 <small> <i class="icon-double-angle-right"></i> <s:if test="id==null">
添加CartShelf</s:if> <s:else>
编辑CartShelf</s:else>
					</small>
				</h1>
			</div>
			<!-- /.page-header -->
			<div class="row">
				<div class="col-xs-12">
					<s:form id="cartShelfForm" action="cartShelf_save" cssClass="form-horizontal" 
					enctype="multipart/form-data" role="form">
						<s:hidden name="id" />
						<s:hidden name="baseQuery.currentPage" />
						<s:hidden name="baseQuery.pageSize" />
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right" for="form-field-1">商品名称：</label>
							<div class="col-sm-9">
								<s:textfield name="sProductName" placeholder="名称" cssClass="col-xs-10 col-sm-5" />
							</div>
						</div>
						
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right" for="form-field-1">商品价格：</label>
							<div class="col-sm-9">
								<s:textfield name="dPrice" placeholder="价格" cssClass="col-xs-10 col-sm-5" />
							</div>
						</div>
						
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right" for="form-field-1">商品数量：</label>
							<div class="col-sm-9">
								<s:textfield name="iCount" placeholder="数量" cssClass="col-xs-10 col-sm-5" />
							</div>
						</div>
						
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right" for="form-field-1">提供地点：</label>
							<div class="col-sm-9">
							
						<s:select list="#cartPlaceList" name="iPlaceId" listValue="sName"
						listKey="iPlaceId" headerKey="-1" headerValue="--请选择--" /> 
							</div>
						</div>
						
					
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right"
								for="form-field-1">上架时间：</label>
							<div class="col-sm-9">
								<s:date name="dtStart" format="yyyy-MM-dd" var="date" />
								
								<s:textfield name="dtStart" placeholder="上架时间" value="%{date}"
									size="13" onclick="WdatePicker({minDate:'2000-01-01',maxDate:'2100-12-31'})" 
									cssClass="Wdate"
									style="height:30px;background:#fff url(/js/My97DatePicker/skin/datePicker.gif) no-repeat right;" />
							</div>
						</div>
						
						
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right"
								for="form-field-1">下架时间：</label>
							<div class="col-sm-9">
								<s:date name="dtEnd" format="yyyy-MM-dd" var="date" />
								
								<s:textfield name="dtEnd" placeholder="下架时间" value="%{date}"
									size="13" onclick="WdatePicker({minDate:'%y-%M-#{%d+1}'})" 
									cssClass="Wdate"
									style="height:30px;background:#fff url(/js/My97DatePicker/skin/datePicker.gif) no-repeat right;" />
							</div>
						</div>
						
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right" for="form-field-1">类型：</label>
							<div class="col-sm-9">
								
								<s:select id="typeCode" list="#allSyscode" name="sysCode.iId" listValue="sName" 
								listKey="iId" headerKey="-1" headerValue="--请选择--" />
								<s:select id="subTypeCode" list="#subTypeCode" name="iTypeSub" listValue="sName"
						listKey="iId" headerKey="-1" headerValue="--请选择--" />
						
								<%-- <s:select list="#allType" name="type" listValue="totalTypeName"
						listKey="totalTypeCode" headerKey="-1" headerValue="--请选择--" /> --%>
							</div>
							
						</div>
						
						<div class="form-group">
 									<label class="col-sm-3 control-label no-padding-right"
										for="form-field-4">图片上传：
									</label>
 									<div class="col-sm-9" style="width: 35%">
 										<input id="id-input-file-2" name="upload" type="file"
 										  onChange="PreviewImage('id-input-file-2','Preview',this,150,80)" />
 										<label
											class="file-label" data-title="Choose"> <span
											class="file-name" data-title="No File ..."> </span>
										</label>
 									</div>
 								</div>
 								
 								<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right" for="form-field-1">图片显示：</label>
							
							<div id="Preview"></div>
							
						</div>
						
						
						<%@include file="/WEB-INF/views/common/button.jsp"%>
					</s:form>
				</div>
			</div>
		</div>
	</div>
</body>
</html>
